package com.znufe.exam.viewmodel.admin.grade;

import com.znufe.exam.domain.grade.ExamInfoOfCourseOfClassResponseObject;
import com.znufe.exam.utility.DateTimeUtil;
import com.znufe.exam.viewmodel.BaseVM;
import lombok.Data;

@Data
public class ExamInfoOfCourseOfClassResponseVM extends BaseVM {

    private Integer classId;

    private String className;

    private Integer courseId;

    private String courseName;

    private Integer examPaperId;

    private String examPaperName;

    private String createTime;

    public static ExamInfoOfCourseOfClassResponseVM from(ExamInfoOfCourseOfClassResponseObject obj) {
        ExamInfoOfCourseOfClassResponseVM vm = modelMapper.map(obj,
                ExamInfoOfCourseOfClassResponseVM.class);
        vm.setCreateTime(DateTimeUtil.dateFormat(obj.getCreateTime()));
        return vm;
    }

}
